import {getCatelist} from "../../../util/axios"
const state={
   sortlist:[]
}
const getters={
    getSortlist(state){
        return state.sortlist
    }
}
const mutations={
    REQ_SORT(state,payload){
        state.sortlist = payload
    }
}
const actions={
    getSortList({commit}){
        getCatelist({ istree: true }).then((res) => {
            if (res.code == 200) {
               commit("REQ_SORT",res.list)
            }
          });
    }
}


export default{
    state,
    getters,
    mutations,
    actions,
    namespaced:true
}